﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace App.Validate
{
    public class ValidationError
    {
        public string       Message { get; internal set; }
        public object       Target { get; internal set; }
        public Validator    Validator { get; internal set; }


        public ValidationError(string message, object target, Validator validator)
        {
            Guard.ArgumentNotNull(message, "message");
            Guard.ArgumentNotNull(target, "target");
            Guard.ArgumentNotNull(validator, "validator");

            this.Message = message;
            this.Target = target;
            this.Validator = validator;
        }

        /// <summary>
        /// colvinliu
        /// </summary>
        public string PropertyName { get; set; }

    }
}